// -*- coding: utf-8 -*- 
/**
 * Project: AlgorithmsLearn
 * Creator: yanking
 * Create time: 2022-02-23 16:53
 * IDE: IntelliJ IDEA
 * Introduction:
 */
package com.leetCode.PathwithMaximumGold;

public class runMaxGold {
    public static void main(String[] args) {
        //int[][] grid = {{1, 0, 7}, {2, 0, 6}, {3, 4, 5}, {0, 3, 0}, {9, 0, 20}};
        //int[][] grid = {{0, 6, 0}, {5, 8, 7}, {0, 9, 0}};
        int[][] grid = {{1, 0, 7, 0, 0, 0}, {2, 0, 6, 0, 1, 0}, {3, 5, 6, 7, 4, 2}, {4, 3, 1, 0, 2, 0}, {3, 0, 5, 0, 20, 0}};
        show(grid);
        //System.out.println(new PathWithMaximumGold().getMaximumGold(grid));
        System.out.println("Next");
        PathWithMaximumGold pG = new PathWithMaximumGold();
        pG.getMaximumGold(grid);
        pG.travelMesh(grid, 4, 4, 0);
        System.out.println(pG.gold);

    }

    private static void show(int[][] grid) {
        for (int i = 0; i < grid.length; i++) {
            for (int j = 0; j < grid[i].length; j++) {
                System.out.print(grid[i][j] + "\t\t");
            }
            System.out.println();
        }
    }


}
